package com.hns.can.service.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hns.can.common.aop.orgTree.LeftOrgAnnotation;
import com.hns.can.common.vo.CommonParamsVo;
import com.hns.can.service.vo.VehicleTypeCountVo;
import com.hns.frame.mybatis.Pagination;
import com.hns.frame.service.CommonService;
import com.hns.tool.pub.PubUtil;

@Service
public class VehicleManageService extends CommonService {

	/**
	 * @param params
	 * @param request
	 * @return
	 * @author:zhangy
	 * @email:zhangyu2222z@sina.cn
	 * @创建日期:2015年8月3日
	 * @功能说明：车辆类型统计
	 */
	@LeftOrgAnnotation()
    @Transactional
	public Pagination getVehicleTypeCount(CommonParamsVo params){
		Pagination page = this.myBatisPage(
				"vehicleTypeCount.getVehicleTypeCountNum",
				"vehicleTypeCount.getVehicleTypeCountInfo", params, 
				VehicleTypeCountVo.class);
		return page;
	}
	
	
	/**
	 * @param params
	 * @param request
	 * @return
	 * @author:zhangy
	 * @email:zhangyu2222z@sina.cn
	 * @创建日期:2015年8月3日
	 * @功能说明：车辆类型统计导出
	 */
	@SuppressWarnings({ "unchecked" })
	@LeftOrgAnnotation()
    @Transactional
	public List<VehicleTypeCountVo> getVehicleTypeCount4Export(CommonParamsVo params){
		List<VehicleTypeCountVo> list = PubUtil.convertListMapToObject(sqlMapDao.selectList(
				"vehicleTypeCount.getVehicleTypeCountInfo", params),
				VehicleTypeCountVo.class);
		return list;
	}
	
}
